<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/5/23
 * Time: 上午9:51
 */


$html = '
<!DOCTYPE html>
<html>
<body>
This is some &lt;b&gt;bold&lt;/b&gt; text.
<img>
</body>
</html>
';

//echo $html;
//echo htmlspecialchars($html);
//echo preg_replace('<.?^>',"",($html));

echo strip_tags($html);